package com.hengxing.demo.model;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @author hengxing
 * @version 1.0
 * @project SocketDemoHx
 * @date 5/30/2023 13:59:41
 */
@Component
@PropertySource("classpath:ip.properties")
@ConfigurationProperties(prefix = "controller")
public class Controller {


    public List<String> ip;
    public int port;

    @Override
    public String toString() {
        return "Controller{" +
                "ip=" + ip +
                ", port=" + port +
                '}';
    }

    public List<String> getIp() {
        return ip;
    }

    public void setIp(List<String> ip) {
        this.ip = ip;
    }

    public int getPort() {
        return port;
    }

    public void setPort(int port) {
        this.port = port;
    }
}
